-- GENERATED SPELL FOR [Arcane Torrent] --


function spell0_14399(pUnit, Event) --@Forked Lightning,n/a--
pUnit:FullCastSpellOnTarget(22945,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14399', 1500, 1)
end

function spell1_14399(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(22946,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14399', 17500, 1)
end

function Sorts_14399(pUnit, Event)
local choix_sorts_14399 = math.random(0, 1)
if choix_sorts_14399 == 0 then
pUnit:RegisterEvent('spell0_14399', 1, 1)
end
if choix_sorts_14399 == 1 then
pUnit:RegisterEvent('spell1_14399', 1, 1)
end
end

function mob14399_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14399', math.random(1500, 3000), 1)
end

function mob14399_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14399_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14399_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14399, 1, 'mob14399_Action')
RegisterUnitEvent(14399, 2, 'mob14399_Leave')
RegisterUnitEvent(14399, 3, 'mob14399_Kill')
RegisterUnitEvent(14399, 4, 'mob14399_Die')
